load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "mppcoordmanager",
    srcs = ["mpp_coordinator_manager.go"],
    importpath = "github.com/pingcap/tidb/executor/mppcoordmanager",
    visibility = ["//visibility:public"],
    deps = [
        "//executor/metrics",
        "//kv",
        "//store/copr",
        "//util/logutil",
        "@com_github_pingcap_errors//:errors",
        "@com_github_pingcap_kvproto//pkg/mpp",
        "@org_uber_go_zap//:zap",
    ],
)

go_test(
    name = "mppcoordmanager_test",
    timeout = "short",
    srcs = ["mpp_coordinator_manager_test.go"],
    embed = [":mppcoordmanager"],
    flaky = True,
    race = "on",
    deps = [
        "//kv",
        "//store/copr",
        "@com_github_stretchr_testify//require",
    ],
)
